package de.tabuma.customer.controller;

import de.tabuma.customer.*;
import de.tabuma.customer.entity.*;
import de.tabuma.customer.logik.*;
import de.tabuma.customer.view.*;
import de.tabuma.lib.*;

import java.io.*;
import java.util.*;
import java.util.logging.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.google.appengine.api.users.*;

/**
 *
 * @author alefen
 */
public class listController extends tabumacontroller {

    private static final Logger log = Logger.getLogger(listController.class.getName());

    public listController(String servlet, Hashtable parameter) {
        super(servlet, parameter);
    }
    
    public void navigate(ServletContext context, HttpServletRequest request, HttpServletResponse response, PrintWriter out) {

        UserService userService = UserServiceFactory.getUserService();
        User user = userService.getCurrentUser();

        List<Customer> cList = CustomerFacade.getCustomer(user.getEmail());
        request.setAttribute(constants.listAttribute, cList);

    }
    
}
